Technical Q&A QA1257
Toolkit.beep doesn't beep!


Q: My Java 1.3.1 application calls java.awt.Toolkit.beep , but no sound ever plays. What's the deal?

A: There is a known issue on Mac OS X which causes Toolkit.beep to not actually produce sound on Java 1.3.1. The problem only occurs with Java applications inside a Mac OS X ".app" bundle. Java Web Start applications specifying a version of 1.3.* may also be affected. Command line and double-clickable jar applications will work fine on 1.3.1, and .app-bundled applications also work as expected in 1.4.1.

There is no known workaround for these conditions under Java 1.3.1. You can, of course, provide a self-contained sound instead. If the combination of 1.3.1 and Toolkit.beep are an absolute necessity, you will need to resort to shell script-based deployment, or if possible use a single double-clickable Jar. Java Web Start applications can switch to Java 1.4.1 or later using the standard JNLP mechanism.

You can also switch your bundled applications to use 1.4.1 using the JVMVersion Java Property in the Info.plist file.

For instructions on all of these deployment options, please see the Java 1.4.1 Release Notes .


[Apr 11, 2003]


Developer Documentation | Technical Notes | Development Kits | Sample Code